//
//  AirCraftVC.m
//  UILibOCSample
//
//  Created by apple on 2018/3/16.
//  Copyright © 2018年 DJI. All rights reserved.
//

#import "AirCraftVC.h"
#import "DJIRootViewController.h"
@interface AirCraftVC ()

@end

@implementation AirCraftVC

- (void)viewDidLoad {
    [super viewDidLoad];
    [self initUI];
}

- (void)initUI {
    //返回按钮
//    UIButton *backBtn = [UIButton new];
//    [backBtn setTitle:@"返回" forState:0];
//    [backBtn setTitleColor:[UIColor redColor] forState:0];
//    [backBtn addTarget:self action:@selector(back) forControlEvents:(UIControlEventTouchUpInside)];
//    [self.view addSubview:backBtn];
//    [backBtn mas_makeConstraints:^(MASConstraintMaker *make) {
//        make.left.mas_equalTo(0);
//        make.top.mas_equalTo(34);
//        make.size.mas_equalTo(CGSizeMake(100,50));
//    }];
    UIView *bgView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_WIDTH)];
    bgView.backgroundColor = [UIColor whiteColor];
    
    [self.view addSubview:bgView];
    
    [self.view insertSubview:bgView atIndex:(int)self.view.subviews.lastObject];
    DJIRootViewController *vc = [DJIRootViewController new];
    
    [self.navigationController pushViewController:vc animated:NO];
    
    
}

- (void)back {
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
